package com.bafa.util.comparators;

import java.util.Comparator;

import com.bafa.objects.season.Season;




public class SeasonComparator implements Comparator {

	public int compare(Object arg0, Object arg1) {
		Season season1 = (Season)arg0;
		Season season2 = (Season)arg1;
		
		int comparing = 0;
		
		comparing = season2.getYear()-season1.getYear();
		
		if(comparing==0){
			comparing = season2.getId()-season1.getId();
		}
		
		return comparing;
		
	}

}
